//
//  WSHelperProtocol.H
//  WSFramework
//
//  Created by zhangcong on 2018/1/10.
//  Copyright © 2018年 zhangcong. All rights reserved.
//

#import <Foundation/Foundation.h>
#define HELPER_SHARED(CLASS)+(instancetype)shared{ \
static CLASS *sharedHelper = nil;\
static dispatch_once_t predicate;\
dispatch_once(&predicate, ^{\
sharedHelper = [[CLASS alloc] init];\
});\
return sharedHelper;}

//#define HELPER_SHARED(CLASS) static id _instance;\
//+(instancetype)allocWithZone:(struct _NSZone *)zone\
//{\
//static dispatch_once_t onceToken;\
//dispatch_once(&onceToken, ^{\
//_instance = [super allocWithZone:zone];\
//});\
//return _instance;\
//}\
//\
//+(instancetype)shared{ \
//return [[self alloc]init];\
//}\
//-(id)copyWithZone:(NSZone *)zone\
//{\
//return _instance;\
//}\
//\
//-(id)mutableCopyWithZone:(NSZone *)zone\
//{\
//return _instance;\
//}



/**
 * 单例统一接口协议
 */
@protocol WSHelperProtocol <NSObject>
+(instancetype)shared;
@end

